﻿using Domain.Entitys;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class RolesJurisdictionConfigers : IEntityTypeConfiguration<RolesJurisdiction>
    {
        /// <summary>
        /// 角色权限表
        /// </summary>
        /// <param name="builder"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void Configure(EntityTypeBuilder<RolesJurisdiction> builder)
        {
            builder.ToTable(nameof(RolesJurisdiction));
            builder.HasKey(rj => rj.RolesJID);
            builder.Property(rj => rj.RolesID).IsRequired();
            builder.Property(rj => rj.JuriID).IsRequired();
        }
    }
}
